package com.gis.bigdata.spark02.core.framework.util

import org.apache.spark.SparkContext

/**
 * @author LnnuUser
 * @create 2022-10-07-下午10:10
 */
object EnvUtil {

  private val scLocal = new ThreadLocal[SparkContext]()

  def put(sc : SparkContext) = {
    scLocal.set(sc)
  }

  def take() = {
    scLocal.get()
  }

  def clear(): Unit ={
    scLocal.remove()
  }

}
